import Http from './http'
class MusicHttp extends Http {
    static getHotMusic() {
        return this.request({
            url: "/top/playlist/highquality"
        })
    }
    static getNewMusic() {
        return this.request({
            url: "/album/newest"
        })
    }
    static getDjMusic() {
        return this.request({
            url: "/personalized/djprogram"
        })
    }
    static getDetailMusic(id) {
        return this.request({
            url: `playlist/detail?id=${id}`
        })
    }
    static getTime(time) {
        time = time / 1000;
        var m = Math.floor(time / 60);
        m = m < 10 ? '0' + m : m;
        var s = Math.floor(time % 60);
        s = s < 10 ? '0' + s : s;
        return m + ":" + s;
    }
}
export default MusicHttp;
